package com.example.demo.service;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author LIN
 * @date 2022-03-17 17:21
 */
@Component
public class TxTestService {


//    @Transactional(propagation = Propagation.MANDATORY)
    public void t2() {
        t3();
    }
    @Transactional(propagation = Propagation.MANDATORY)
    public void t3() {
        System.out.println("测试事务传播机制");
    }
}
